//package com.xiguaji.tiktok.task.ranking.repository;
//
//import com.xiguaji.tiktok.task.ranking.model.Ranking;
//import org.springframework.data.jdbc.repository.query.Query;
//import org.springframework.data.repository.CrudRepository;
//import org.springframework.stereotype.Repository;
//
//import java.util.List;
//
//
//@Repository
//public interface RankingRepository extends CrudRepository<Ranking,Long>,RankingExtRepository {
//
//
//
//    @Query("SELECT id,blogger_type,ranking_type,blogger_id,uid,nickname,unique_id,avatar,state,position," +
//            "(select o_follower_count from blogger_main where o_uid = uid) as follower,belong," +
//            "AVG(likes_growth) as likes_growth,AVG(review_growth) as review_growth,AVG(share_growth) as share_growth, avg(score) as score " +
//            "FROM ranking " +
//            "WHERE blogger_type = :bloggerType and ranking_type = :rankingType and belong  BETWEEN :firstDate and :lastDate " +
//            "group by uid " +
//            "order by avg(score) desc limit 0,1000")
//    List<Ranking> findRankings(long bloggerType, int rankingType, int firstDate, int lastDate);
//
//    List<Ranking> findRankingsByBloggerTypeAndRankingTypeAndBelongOrderByScoreDesc(long bloggerType, int rankingType, int belong);
//
//}
